﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _008热水器
{
    /// <summary>
    /// 警报器
    /// </summary>
    class Alarm
    {

        public Alarm(Heater heater)
        {
            heater.alarmEvent += MakeAlert;
        }
        //发警报
        private void MakeAlert(int param)
        {
            Console.WriteLine("Alarm:嘀嘀嘀,水已经{0}度了",param);
        }
    }
}
